import Vue from 'vue'
import XiaoDad from './XiaoDad.vue'
import VueRouter from 'vue-router'
import router from './router/index'
import elementui from './elementui/elementui'
import axios from 'axios'
import Vuex from 'vuex'
import store from './store'
import VueCookies from 'vue-cookies'
Vue.use(VueCookies)
import nutui from './nutui/nutui'
// import {postRequest} from "./utils/api";

Vue.use(VueRouter)
Vue.use(Vuex)
Vue.prototype.axios = axios;
Vue.config.productionTip = false

axios.defaults.headers.post = {
  'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
  // "X-CSRFToken": $.cookie("csrftoken"),
  // "X-CSRFToken": ,
}
axios.defaults.baseURL="/hggoodApi/"
// axios.defaults.baseURL="http://localhost:8080/"
// axios.defaults.baseURL="https://www.haiggood.com/"
// axios.defaults.baseURL="http://101.43.68.39/"

new Vue({
  render: h => h(XiaoDad),
  router,
  elementui,
  nutui,
  // store,
  beforeCreate() {
		Vue.prototype.$bus = this
    Vue.prototype.$addr = axios;
	},
}).$mount('#hggood')
